<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Deflate data</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.http-chunked-decode.html">http_chunked_decode</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.http-inflate.html">http_inflate</a></div>
 <div class="up"><a href="ref.http.html">HTTP 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.http-deflate" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">http_deflate</h1>
  <p class="verinfo">(PECL pecl_http &gt;= 0.15.0)</p><p class="refpurpose"><span class="refname">http_deflate</span> &mdash; <span class="dc-title">Deflate data</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.http-deflate-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>http_deflate</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   Compress data with <em>gzip</em>, <em>zlib</em> AKA <em>deflate</em> or <em>raw deflate</em> encoding.
  </p>
  <p class="para">
   See the <a href="http.constants.html#http.constants.deflate" class="link">deflate constants table</a> for possible values for the <var class="varname"><var class="varname">flags</var></var> parameter.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.http-deflate-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">data</code></em></dt>

     <dd>

      <p class="para">
       String containing the data that should be encoded
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">flags</code></em></dt>

     <dd>

      <p class="para">
       deflate options
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.http-deflate-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the encoded string on success, or <strong><code>NULL</code></strong> on failure.
  </p>
 </div>


 


 


 


 <div class="refsect1 seealso" id="refsect1-function.http-deflate-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.http-inflate.html" class="function" rel="rdfs-seeAlso">http_inflate()</a> - Inflate data</span></li>
    <li class="member"><a href="class.httpdeflatestream.html" class="link"><a href="class.httpdeflatestream.html" class="classname">HttpDeflateStream</a></a></li>
   </ul>
  </p>
 </div>



</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.http-chunked-decode.html">http_chunked_decode</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.http-inflate.html">http_inflate</a></div>
 <div class="up"><a href="ref.http.html">HTTP 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
